' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.08.29.21.34]) on 2023.09.01 at 23:47 (Coordinated Universal Time) ' GW-BASIC program as shared by Benito Navarro Martinez ' at https://www.facebook.com/groups/2057165187928233/permalink/3463885077256230/ ' Ported to BAM by Charlie Veniot 10 DEF FNX(A,B)=(A OR B) AND NOT (A AND B) 20 GOSUB 80 30 GOSUB 210 40 GOSUB 330 50 PRINT 60 PRINT "THANKS FOR WATCHING" 70 END 80 PRINT 90 PRINT "- - AND - -" ' 🟠edited by Charlie, double-dashes trip up BAM (TODO: fix) 100 PRINT " A"," B" 110 FOR A=1 TO 0 STEP -1 120 FOR B=1 TO 0 STEP -1 130 X=A : GOSUB 500 140 X=B : GOSUB 500 150 X=A * B : GOSUB 500 170 PRINT 180 NEXT 190 NEXT 200 RETURN 210 PRINT 220 PRINT "- - OR - -" ' 🟠edited by Charlie, double-dashes trip up BAM (TODO: fix) 230 FOR A=1 TO 0 STEP -1 240 FOR B=1 TO 0 STEP -1 250 X=A : GOSUB 500 260 X=B : GOSUB 500 270 X=SGN(A+B) : GOSUB 500 290 PRINT 300 NEXT 310 NEXT 320 RETURN 330 PRINT 340 PRINT "- - XOR - -" ' 🟠edited by Charlie, double-dashes trip up BAM (TODO: fix) 350 FOR A=1 TO 0 STEP -1 360 FOR B=1 TO 0 STEP -1 370 X=A : GOSUB 500 380 X=B : GOSUB 500 390 X=FNX(A,B) : GOSUB 500 410 PRINT 420 NEXT 430 NEXT 440 RETURN 500 MSG$="TRUE " ' 🟠edit by Charlie Veniot, added a space for alignment 510 IF X=0 THEN MSG$="FALSE" 520 PRINT MSG$, SLEEP 0.1 ' 🟠added by Charlie Veniot, for a little bit of animation effect 530 RETURN